package stark.app.function.visualai;

import android.widget.Button;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import stark.app.R;
import stark.common.basic.adaptermutil.StkProviderMultiAdapter;

/**
 * Author：daizhongbin on 2023/10/11
 * Email：1027154338@qq.com
 * Desc:
 */
public class VisualAiFuncAdapter extends StkProviderMultiAdapter<VisualAiFuncType> {

    public VisualAiFuncAdapter(int spanCount) {
        super(spanCount);
        addItemProvider(new ItemProvider());
    }

    private class ItemProvider extends BaseItemProvider<VisualAiFuncType> {

        @Override
        public int getItemViewType() {
            return StkProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_visual_ai_func;
        }

        @Override
        public void convert(@NonNull BaseViewHolder holder, VisualAiFuncType type) {
            holder.setText(R.id.btnName, type.getName());
        }
    }

}
